#ifndef FORMDMXADDRSETTING_H
#define FORMDMXADDRSETTING_H

#include <QWidget>
#include <dialogvkb.h>
#include <dcsdboperator.h>

#include "udpworker.h"

#include "dialogslaveparamwrite.h"

namespace Ui
{
    class FormDMXAddrSetting;
}

class FormDMXAddrSetting : public QWidget
{
Q_OBJECT

public:
    explicit FormDMXAddrSetting(QWidget *parent = nullptr);

    ~FormDMXAddrSetting() override;

    void dmxAddrWrite(unsigned short slaveId);

    void dmxAddrWriteCheck(unsigned short slaveId);

private slots:

    void on_pushButtonDMXAddrSettingReturn_clicked();

    void show_numberkeyboard_ui(QString data);

    void confirmString(QString gemfield);

    void on_pushButtonWrite_clicked();

    void on_lineEditStartID_textChanged(const QString &text);

    void on_comboBoxBoardType_currentIndexChanged(int index);

    void on_dataRecved(QByteArray &data);

    void on_checkBoxPortAll_stateChanged(int arg1);

    void on_lineEditLedChNum_textChanged(const QString &arg1);

    void on_InputDialogCommit();

private:
    Ui::FormDMXAddrSetting *ui;
    DialogSlaveParamWrite *towInputWin{};
    DCSDbOperator *mDbopt{};
    DialogVKB *numberkeyboard;
    QString lineEdit_object;//判断哪个lineedit调用了软件盘
    UdpWorker *mUdp;

    unsigned int mLedNo{};        //起始LED编号
    unsigned int mLedColorNum{};  //LED颜色数
    unsigned int mStartAddr{};    //起始地址
    unsigned int mDriveBoradType;
};

#endif // FORMDMXADDRSETTING_H
